package com.example.studentproj.repository;


import com.example.studentproj.model.Class1;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ClassRepository extends JpaRepository<Class1, Long> {

    //获取class所有班级名字
    @Query("select c.name from Class1 c ")
    List<Class1> findByClassName();

}
